/**
 * @description 页面路由
 * @author wangxin
 * @date 2020-6-1
 * @version 1.0
 */
import { Router, POWERS } from "_/schema";
import settings from "@/settings";
// 合并默认参数
settings.merge({
  route: {
    index: "index",
    login: "login"
  }
});
export default [
  new Router("global-home").path('/').redirect(settings.route.index)
    .append(
      new Router(settings.route.index, 'planar-drxx06', '概述').sort(0)
        .path(settings.route.index).powers([POWERS.BROWSER])
        .component(() => import(/* webpackChunkName: "views" */'../pages/Home/Home'))
    )
    .build(),
  new Router('passport-index').path('/passport')
    .hideInMenu(true).hideInBread(true).isNullComponent()
    .append(
      new Router(settings.route.login, '登录')
        .path(settings.route.login).hideInMenu(true)
        .component(() => import(/* webpackChunkName: "views" */'../pages/Login/Login'))
    )
    .append(
      new Router('passport-personal').path('personal')
        .hideInMenu(true).hideInBread(true)
        .append(
          new Router('passport-personal-center', '个人中心')
            .path('center')
            .component(() => import('../pages/personal-center/PersonalCenter'))
        )
    )
    .build(),
  new Router('error_404', 'error-404').path('*').hideInMenu().sort(10000)
    .component(() => import(/* webpackChunkName: "views" */'../pages/Errors/404'))
    .build()
];
